package org.cmind.soap.android.envelope;

import java.util.ArrayList;
import java.util.List;

import org.cmind.soap.android.Attribute;
import org.cmind.soap.android.ComplexSoapObject;

class Soap11EnvelopeBuilder extends EnvelopeBuilder {

    static final String SOAP_NAMESPACE = "http://schemas.xmlsoap.org/soap/envelope/";

    @Override
    protected ComplexSoapObject createBody() {
        return EnvelopeUtil.createBody(SOAP_NAMESPACE);
    }

    @Override
    protected ComplexSoapObject createHeader() {
        return EnvelopeUtil.createHeader(SOAP_NAMESPACE);
    }

    @Override
    protected List<Attribute> createAttibutes() {

        List<Attribute> result = new ArrayList<Attribute>();
        Attribute attr = new Attribute("encodingStyle", "http://www.w3.org/2001/12/soap-encoding", SOAP_NAMESPACE);
        result.add(attr);
        return result;

    }

    @Override
    protected String getNamespace() {
        return SOAP_NAMESPACE;
    }


}
